package com.cpht.app.webapp.action;

import java.io.Serializable;
import java.util.List;

import com.cpht.app.webapp.action.BasePage;
import com.cpht.app.model.Pet;
import com.cpht.app.service.GenericManager;

public class PetList extends BasePage implements Serializable {
    private GenericManager<Pet, Long> petManager;

    public void setPetManager(GenericManager<Pet, Long> petManager) {
        this.petManager = petManager;
    }

    public PetList() {
        setSortColumn("id"); // sets the default sort column
    }

    public List getPets() {
        return sort(petManager.getAll());
    }
}

